import Vue from 'vue'
import Router from 'vue-router'
import login from 'components/login/login'
import mine from 'components/mine/mine'
import income from 'components/mine/income'
import order from 'components/order/order'
import task from 'components/task/task'
import detail from 'components/task/detail'
import detail2 from 'components/task/detail2'
import detail3 from 'components/task/detail3'
import courier from 'components/courier/courier'
import haha from 'components/haha'
import rob from 'components/robitem'


Vue.use(Router)

export default new Router({
  routes: [
    { path: '/', redirect: '/order' },//设置默认路由
    {
      path: '/login',
      component: login
    },
    {
      path: '/mine',
      component: mine
    },
    {
      path: '/income',
      component: income
    },
    {
      path: '/order',
      component: order
    },
    {
      path: '/task',
      component: task,
      redirect: '/task/item/0',
      children:[
          {path: '/task/item/:id', component: task}
      ]
    },
    {
      path: '/detail/:id',
      component: detail
    },
    {
      path: '/detail2/:id',
      component: detail2
    },
    {
      path: '/detail3/:id',
      component: detail3
    },
    {
      path: '/courier',
      component: courier,
      redirect: '/courier/item/0',
      children:[
          {path: '/courier/item/:id', component: courier}
      ]
    },
    {
      path: '/rob',
      component: rob
    }
  ]
})
